import Vue from 'vue'
import Router from 'vue-router'
import { sec } from './sec'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {path: '*', redirect: '/login'},
    {path: '/', redirect: '/login'},
    {
      path: '/login',
      component: resolve => require(['../views/login/Login'], resolve)
    },
    {
      path: '/main',
      component: resolve => require(['../views/Main'], resolve),
      children: [
        ...sec
      ]
    }
  ]
})